/*
 * @Author: wangyongcun
 * @Date: 2023-09-06 10:50:08
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-06-08 19:43:33
 * @Description: 导入所有的路由
 */

/* 引入路由 */
import Router from "@koa/router";
const useRouter = new Router({ prefix: "/api" });

/* 登录相关服务 */
import Login from "./login.js";
useRouter.post("/login", Login.login.bind(Login));
useRouter.post("/loginOut", Login.loginOut.bind(Login));

/* 用户管理服务 */
import User from "./user.js";
useRouter.post("/addUser", User.addUser.bind(User));
useRouter.post("/updateUser", User.updateUser.bind(User));
useRouter.post("/deleteUser", User.deleteUser.bind(User));
useRouter.post("/queryUser", User.queryUser.bind(User));
useRouter.post("/queryUserList", User.queryUserList.bind(User));
/* 项目评测管理服务 */
import Assess from "./assess.js";
useRouter.post("/addAssess", Assess.addAssess.bind(Assess));
useRouter.post("/updateAssess", Assess.updateAssess.bind(Assess));
useRouter.post("/deleteAssess", Assess.deleteAssess.bind(Assess));
useRouter.post("/queryAssess", Assess.queryAssess.bind(Assess));
useRouter.post("/queryAssessList", Assess.queryAssessList.bind(Assess));
/* 科技成果管理服务 */
import Fruit from "./fruit.js";
useRouter.post("/addFruit", Fruit.addFruit.bind(Fruit));
useRouter.post("/updateFruit", Fruit.updateFruit.bind(Fruit));
useRouter.post("/deleteFruit", Fruit.deleteFruit.bind(Fruit));
useRouter.post("/queryFruit", Fruit.queryFruit.bind(Fruit));
useRouter.post("/queryFruitList", Fruit.queryFruitList.bind(Fruit));
/* 案例管理服务 */
import Case from "./case.js";
useRouter.post("/addCase", Case.addCase.bind(Case));
useRouter.post("/updateCase", Case.updateCase.bind(Case));
useRouter.post("/deleteCase", Case.deleteCase.bind(Case));
useRouter.post("/queryCase", Case.queryCase.bind(Case));
useRouter.post("/queryCaseList", Case.queryCaseList.bind(Case));
/* 技术需求服务 */
import Demand from "./demand.js";
useRouter.post("/addDemand", Demand.addDemand.bind(Demand));
useRouter.post("/updateDemand", Demand.updateDemand.bind(Demand));
useRouter.post("/deleteDemand", Demand.deleteDemand.bind(Demand));
useRouter.post("/queryDemand", Demand.queryDemand.bind(Demand));
useRouter.post("/queryDemandList", Demand.queryDemandList.bind(Demand));
/* 政策管理服务 */
import Policy from "./policy.js";
useRouter.post("/addPolicy", Policy.addPolicy.bind(Policy));
useRouter.post("/updatePolicy", Policy.updatePolicy.bind(Policy));
useRouter.post("/deletePolicy", Policy.deletePolicy.bind(Policy));
useRouter.post("/queryPolicy", Policy.queryPolicy.bind(Policy));
useRouter.post("/queryPolicyList", Policy.queryPolicyList.bind(Policy));
useRouter.post("/queryPolicyType", Policy.queryPolicyType.bind(Policy));

/* 项目管理服务 */
import Project from "./project.js";
useRouter.post("/addProject", Project.addProject.bind(Project));
useRouter.post("/updateProject", Project.updateProject.bind(Project));
useRouter.post("/deleteProject", Project.deleteProject.bind(Project));
useRouter.post("/queryProject", Project.queryProject.bind(Project));
useRouter.post("/queryProjectList", Project.queryProjectList.bind(Project));
useRouter.post("/queryProjectDic", Project.queryProjectDic.bind(Project));

/* 文件管理服务 */
import File from "./file.js";
useRouter.post("/uploadFile", File.uploadFile.bind(File));
useRouter.all("/downloadFile", File.downloadFile.bind(File));
useRouter.post("/deleteFile", File.deleteFile.bind(File));

/* 导出路由 */
export default useRouter;
